home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / science / sm32a.zip / LIBRARY / SERIES.LI < prev    next >
Text File  |  1993-12-19  |  374b  |  9 lines

  1. # series(f,x,order)    generates a Taylor power series expansion for 
  2. #            f about the point x=0 to order x^n.
  3. # series(f,x)        with the default order n=5.
  4. #     e.g. series(sin(x), x)    gives x-x^3/6+x^5/120
  5. # generate the Taylor power series for sin(x)
  6.  
  7. series(y_,x_,n_) := subs(subs(y+sum(d(y, x, j)*xx^j/j!, j from 1 to n, 1),x = 0), xx = x)
  8. series(y_,x_) := series(y,x,5)
  9.